--- stunnel-5.02.org/src/ssl.c	2014-07-12 06:13:07.356889656 +0000
+++ stunnel-5.02/src/ssl.c	2014-07-12 06:15:39.032889896 +0000
@@ -195,6 +195,7 @@
     }
     s_log(LOG_DEBUG, "RAND_screen failed to sufficiently seed PRNG");
 #else
+#ifdef HAVE_RAND_EGD
     if(global->egd_sock) {
         if((bytes=RAND_egd(global->egd_sock))==-1) {
             s_log(LOG_WARNING, "EGD Socket %s failed", global->egd_sock);
@@ -207,6 +208,7 @@
                          so no need to check if seeded sufficiently */
         }
     }
+#endif
     /* try the good-old default /dev/urandom, if available  */
     totbytes+=add_rand_file(global, "/dev/urandom");
     if(RAND_status())
